/**
 * Created by Delicate on 2018/1/3.
 */
import React from 'react';
import {
    StyleSheet,
    View,
    Text,
} from 'react-native';

import NavBar from '../../components/NavBarView'
import Menu from '../../components/HorizontalMenuView'

let _self;

class Views extends React.Component {

    constructor(props) {
        super(props)
        _self = this;
    }

    componentWillMount() {

    }

    componentDidMount() {

    }

    skip(path, params) {
        _self.props.navigation.navigate(path, params);
    }

    render() {
        return (
            <View style={base.baseOuter}>
                <NavBar host={this} title="帮助中心"/>
                <View style={styles.container}>
                    <View style={styles.box}>
                        <Menu
                            text="登录与注册问题"
                            onPress={()=>this.skip('Help',{id:'1'})}/>
                        <Menu
                            text="企业实名认证"
                            onPress={()=>this.skip('Help',{id:'2'})}/>
                        <Menu
                            text="如何快速发布资产需求"
                            onPress={()=>this.skip('Help',{id:'3'})}/>
                        <Menu
                            last={true}
                            text="如何完善资产资料"
                            onPress={()=>this.skip('Help',{id:'4'})}/>
                    </View>
                </View>
                <View style={[base.rowCC, styles.tipBox]}>
                    <Text allowFontScaling={false} style={styles.tip}>没有解决你的问题？</Text>
                    <Text allowFontScaling={false} onPress={()=>this.skip('Feedback')} style={styles.tipUrl}>去反馈</Text>
                </View>
            </View>
        )
    }
}

const styles = StyleSheet.create({
    container: {
        flex: 1,
    },
    box: {
        backgroundColor: '#fff'
    },
    tipBox: {

    },
    tip: {
        paddingVertical: layout.GAP_VERTICAL_LARGE,
        color: layout.FORM_AUX_FONT_COLOR,
        fontSize: layout.font(24)
    },
    tipUrl: {
        paddingVertical: layout.GAP_VERTICAL_LARGE,
        paddingHorizontal: layout.GAP_HORIZONTAL_MID,
        color: layout.MAIN_COLOR,
        fontSize: layout.font(24)
    },
})

//路由
const HelpList = {
    screen: Views,
    navigationOptions: {
        header: null,
    },
    name: 'HelpList',
    sign: false
};

export default HelpList;